gdk: Run DnD internal handlers before the main event handler
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 8 Jan 2016 20:22:47 +0000 (21:22 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 19 Jan 2016 13:17:35 +0000 (14:17 +0100)
We'll be stealing those to GTK+, if the GdkDragContext manages
the DnD operation.

gdk/gdkevents.c

index 83f8ab11f2efaae013c71fbf57ba630318a7815b..c6bb43e3cef37e822e66def719d019a2377876ab 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "gdkinternals.h"
 #include "gdkdisplayprivate.h"
+#include "gdkdndprivate.h"
 
 #include <string.h>
 #include <math.h>
@@ -65,6 +66,9 @@ static GDestroyNotify _gdk_event_notify = NULL;
 void
 _gdk_event_emit (GdkEvent *event)
 {
+  if (gdk_drag_context_handle_source_event (event))
+    return;
+
   if (_gdk_event_func)
     (*_gdk_event_func) (event, _gdk_event_data);
 }